<template>
	<view class="detail">
		<view class="title">{{detail.title}}</view>
		<view class="info">
			<view class="author">编辑：{{detail.author}}</view>
			<view class="time">发布日期：{{detail.posttime}}</view>
		</view>
		<view class="content">
			<rich-text :nodes="detail.content"></rich-text>
			<view>---------------------------------------------</view>
			{{detail.content}}
		</view>
		<view class="description">版权声名版权声名版权声名版权声名版权声名版权声名版权声名版权声名</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				options: null,
				detail: {}
			}
		},
		props: {
			item: {
				type: Object
			}
		},
		onLoad(e) {
			this.options = e;
			console.log(e);
			this.getDetail()
		},
		methods: {
			getDetail() {
				uni.request({
					url:'https://ku.qingnian8.com/dataApi/news/detail.php',
					data:this.options,
					success: (res) => {
						console.log(res);
						this.detail = res.data;
					}
				})
			}
		}
	}
</script>

<style lang="scss">
.detail {
	padding: 30rpx;
	.title {
		font-size: 46rpx;
		color: #333;
	}
	.info {
		background: #F6F6F6;
		padding: 20rpx 10rpx;
		font-size: 25rpx;
		color: #666;
		display: flex;
		justify-content: space-between;
		margin: 40rpx 0;
	}
	.content {
		padding-bottom: 50rpx;
		img {
			max-width: 100%;
		}
	}
	.description {
		background: #FEF0F0;
		font-size: 16rpx;
		padding: 20rpx;
		color: #F89898;
		line-height: 1.8em;
	}
}
</style>
